        .arch armv6
        .fpu softvfp

.data
fmt:
        .asciz "sum = %d\n"

.text
.code 32
.global _start

_start:
	mov r0, #0  @ 将0放入r0
	mov r1, #10	@ 将10放入r1

sub_loop:
	add r0, r0, r1		@ r0 = r0 + r1
	sub r1, r1, #1		@ r1 = r1 - 1
	cmp r1, #0		@ r1 ?= 0
	bne sub_loop		@

    mov r1, r0
    ldr r0, =fmt
    bl printf

	mov r0, $0
	mov r7, $1
	swi $0

	b .

.data
result:
	.word 0x222222

msg:
	.asciz "Test"

len = . - msg

.end
